<!-- '普通商品'详情 -->
<template>
	<view class="v-delegation-page">
		<uv-skeletons :loading="loading" :skeleton="skeleton">
			<mescroll-body ref="mescrollRef" @init="mescrollInit" :down="downOption" @down="downCallback"
				@up="upCallback">
				<!-- 轮播图 -->
				<swiper v-if="carousel" autoplay="true" class="v-cover" :circular="true">
					<swiper-item v-for="(item, index) in carousel" :key="index">
						<image class="v-cover" :src="item"></image>
					</swiper-item>
				</swiper>
				<view class="bg6 "
					:style="{ '--bg-image': `url(${ activitType==1? activePtPoster:activitType==2? activeMsPoster:activitType==3?activeKjPoster:  activitType==4?activeZcPoster:'none'})`,'height':activitType>0?'140rpx':0 }">
					<view class="flex-betweens" v-if="activitType!=0">
						<view class="">

							<view style="color: #fff;" class="flex-start-center" v-if="activitType!=4">
								<view class="">
									<text v-if="activitType==1"
										style="margin-right: 10rpx;font-size: 44rpx;color: #fff;font-weight: 700;">￥{{detailInfo.current_money}}</text>
									<text v-else
										style="margin-right: 10rpx;font-size: 44rpx;color: #fff;font-weight: 700;">￥{{detailInfo.money}}</text>
									<text
										style="font-size: 26rpx;text-decoration: line-through;color: #fff; ">原价:￥{{detailInfo.price}}</text>
								</view>

							</view>
							<view style="color: #fff;" class="flex-start-center" v-else>
								<view class="">
									<text style="margin-right: 10rpx;font-size: 30rpx;color: #fff;">众筹金额</text>
									<text
										style="margin-right: 10rpx;font-size: 44rpx;color: #fff;font-weight: 700;">￥{{(detailInfo.number*detailInfo.money).toFixed(2)}}</text>
								</view>

							</view>
							<view v-if="activitType==1&&is_status!=1" style="color: #fff; margin-top: 7rpx;font-size: 22rpx; "
								class="margin-top_10rpx">
								{{maxParticipants==currentStep?'拼团完成，以支付价格为准':'当前价不是最终价正在拼团中'}}


							</view>
							<view  v-if="activitType==1&&is_status==1" style="color: #fff; margin-top: 7rpx;font-size: 22rpx; "
								class="margin-top_10rpx">
								{{is_status==1?'请立即支付，超时恢复原价':'当前价不是最终价正在拼团中'}}
							
							
							</view>
							<view v-if="activitType==2" style="color: #EA3337; margin-top: 5rpx;font-size: 22rpx;"
								class="margin-top_10rpx seckill flex">
								秒杀价|365天最低价

							</view>
							<view v-if="activitType==3&&detailInfo.order_id!=0"
								style="color: #EA3337; margin-top: 5rpx;font-size: 22rpx;"
								class="margin-top_10rpx seckill flex">
								当前已砍￥{{((Number(detailInfo.price)- Number(detailInfo.order_money))>(Number(detailInfo.price)- Number(detailInfo.money))?(Number(detailInfo.price)- Number(detailInfo.money)):(Number(detailInfo.price)- Number(detailInfo.order_money))).toFixed(2)}}

							</view>
							<view v-if="activitType==4" style="color: #fff; font-size: 22rpx;"
								class="  flex-start-center margin-top_10rpx">
								<text>众筹人数</text><text
									style="color: #FFCA00;">{{detailInfo.number}}</text><text>人</text>，<text>每人</text><text
									style="color: #FFCA00;">{{detailInfo.money}}</text><text>(元)</text>

							</view>
						</view>
						<view style="margin-right: 20rpx; text-align: center;">
							<view style="margin-top: 5rpx;" v-if="activitType==1">
								<cc-countdown v-if="!(maxParticipants==currentStep)" color="#FFF" background-color="red"
									splitorColor="red" :showColon="true" :showDay="true"
									:day="detailInfo.timeDifference.days" :hour="detailInfo.timeDifference.hours"
									:minute="detailInfo.timeDifference.minutes"
									:second="detailInfo.timeDifference.seconds" @timeup="timeup"></cc-countdown>
								<cc-countdown v-else color="#FFF" background-color="red" splitorColor="red"
									:showColon="true" :showDay="true" :day="detailInfo.timeOrderEnd.days"
									:hour="detailInfo.timeOrderEnd.hours" :minute="detailInfo.timeOrderEnd.minutes"
									:second="detailInfo.timeOrderEnd.seconds" @timeup="timeup"></cc-countdown>
							</view>
							<view style="margin-top: 5rpx;" v-if="activitType==2||activitType==3">
								<cc-countdown color="#EF3C2E" background-color="#fff" splitorColor="red"
									:showColon="true" :showDay="true" :day="detailInfo.timeDifference.days"
									:hour="detailInfo.timeDifference.hours" :minute="detailInfo.timeDifference.minutes"
									:second="detailInfo.timeDifference.seconds" @timeup="timeup"></cc-countdown>
								<!-- <cc-countdown color="#EF3C2E" background-color="#fff" splitorColor="red" :showColon="true"
								:showDay="true" :day="detailInfo.timeDifference.days" :hour="detailInfo.timeDifference.hours" :minute="detailInfo.timeDifference.minutes" :second="detailInfo.timeDifference.seconds"
								@timeup="timeup"></cc-countdown> -->
							</view>
							<view style="margin-top: 5rpx;" v-if="activitType==4">
								<cc-countdown color="#FFF" background-color="red" splitorColor="red" :showColon="true"
									:showDay="true" :day="detailInfo.timeDifference.days"
									:hour="detailInfo.timeDifference.hours" :minute="detailInfo.timeDifference.minutes"
									:second="detailInfo.timeDifference.seconds" @timeup="timeup"></cc-countdown>
							</view>
							<view style="color: #EF3C2E; font-weight: 700;" class="margin-top_10rpx "
								v-if="activitType==1">

								{{maxParticipants==currentStep?'拼团完成':'拼团进行中'}}
							</view>
							<view style="color: #fff;" class="margin-top_10rpx" v-if="activitType==2">
								限时秒杀
							</view>
							<view style="color: #fff;" class="margin-top_10rpx" v-if="activitType==3">
								活动倒计时
							</view>
							<view style="color: #333333;" class="margin-top_10rpx" v-if="activitType==4">
								{{detailInfo.sold==detailInfo.number? '众筹完成 ':'正在众筹中'}}
							</view>

						</view>
					</view>
				</view>
				<view class="v-top" :style="{'marginTop':activitType>0?'-21rpx':'-41rpx'}" v-if="activitType!=4">
					<view class="flex-between" :class="list.length <= 0 ? 'v-p-top2' : 'v-p-top'" v-if="activitType==0">
						<view :class="commission > 0" class="flex-between">
							<view class="v-price" v-if="detailInfo.money">
								￥
								<text>{{ detailInfo.money }}</text>
							</view>

							<view class="margin-left_20rpx">
								<view class="flex-between" style="width: 694rpx;" v-if=" commission">
									<view class="v-commission v-fontsize24">预估佣金￥{{ commission }}</view>
									<view class="">

									</view>
									<!-- 	<view class="flex-align-center">
										<uni-rate :readonly="true" :value="percent_1" :max="5" size="18"
											activeColor="#FF5F4E" margin="5" />
										<view class="v-star-score">{{ (percent_1) }}</view>
									</view> -->
								</view>
								<view class="flex-between" style="width: 694rpx;" v-else>
									<view class="v-commission v-fontsize24">暂无佣金</view>

									<!-- 	<view class="flex-align-center">
										<uni-rate :readonly="true" :value="percent_1" :max="5" size="18"
											activeColor="#FF5F4E" margin="5" />
										<view class="v-star-score">{{ (percent_1) }}</view>
									</view> -->
								</view>
							</view>
						</view>

					</view>
					<view class="" style="padding: 30rpx 28rpx 20rpx;">
						<view class="font-size_38rpx v-bold font-overflow2">
							{{detailInfo.goods_name?detailInfo.goods_name:detailInfo.name}}
						</view>
					</view>

					<view class="flex-wrap-flex-start">
						<view class="history flex" v-for="(item,index) in detailInfo.label" :key="index">
							<text style="margin-right: 10rpx; font-size: 26rpx;">{{item}}</text>
					
						</view>
					
					</view>



					<view class="flex-between v-type ">
						<view>销售{{ detailInfo.sold >= 10 ? detailInfo.sold : '<10' }}</view>
						<view>浏览{{ detailInfo.view }}</view>
						<view class="flex-align-center" v-if="!uid" @click="handleLogin()">
							<image src="/static/zf.png" class="v-img"></image>
							分享{{ detailInfo.share }}
						</view>
						<button open-type="share" class="btncss" v-else>
							<view class="flex-align-center">
								<image src="/static/zf.png" class="v-img"></image>
								分享{{ detailInfo.share?detailInfo.share:'0' }}
							</view>
						</button>
					</view>
				</view>
				<view class="v-top" v-else>
					<view class="flex-between" :class="list.length <= 0 ? 'v-p-top2' : 'v-p-top'">
						<view :class="commission > 0 && distributionSet.distribution_level != 0 ? '' : ''">
							<view class="v-price" style="color: #0f0f0f;font-size: 38rpx;">

								<text>{{detailInfo.goods_name}}</text>
							</view>

						</view>

					</view>
					<view class="flex-wrap-flex-start">
						<view class="history flex" v-for="(item,index) in detailInfo.label" :key="index">
							<text style="margin-right: 10rpx;">{{item}}</text>
					
						</view>
					
					</view>
					<view class="v-conent"> 
						<view class="v-fontsize32  font-overflow2" style="color: #FF0000;margin-bottom: 30rpx;">
							上线预计报价:￥{{detailInfo.price}}（元）</view>
					</view>

				</view>

				<view class="crowdfundingNumbersContainer" v-if="activitType==4">
					<view class="font-weight_bold font-size_30rpx margin-bottom_20rpx">
						已有{{detailInfo.sold}}人参与众筹，仅剩<text
							style="color: #EF3C2E;">{{detailInfo.number-detailInfo.sold}}</text>人众筹成功
					</view>

					<view class="font-size_28rpx">
						已众筹<text
							style="color: #EF3C2E;">{{(detailInfo.sold*detailInfo.money).toFixed(2)}}</text>元，仅差<text
							style="color: #EF3C2E;">{{(((detailInfo.number*detailInfo.money).toFixed(2))-(detailInfo.sold*detailInfo.money)).toFixed(2)}}</text>元
					</view>


					<view class="flex-wrap-flex-start-center margin-top_30rpx">
						<view class="" v-for="(i,j) in 12" :key="j">
							<image v-if="imgList[i]" class="joinAvaterImg" :src="imgList[i]" mode="aspectFill"></image>
							<image v-else class="joinAvaterImg" src="/static/组合3023.png" mode="aspectFill"></image>
						</view>
					</view>
					<!-- imgList -->
				</view>

				<!-- 销售版本类型 -->
				<view class="versionType" v-if="activitType>0">
					<!-- <picker mode="selector" @change="bindPickerChange4" :range="copywritingList"
					:range-key="'copywritingContent'">
					<view class="flex-between " style="padding: 40rpx 20rpx 20rpx 20rpx">
						<view class="flex-start-center">
							<image class="versionTypeImg" src="/static/path.png" mode=""></image>
							<text>{{copywriting?'已选':'请选择版本'}}{{copywriting}}</text>
						</view>
						<view class="">
							<image class="rightImg" src="/static/arrowRight.png" mode=""></image>
						</view>
					</view>
				</picker> -->

					<view class="flex-between " style="padding: 40rpx 20rpx 20rpx 20rpx" v-if="activitType==2">
						<view class="flex-start-center">
							<image class="versionTypeImg" src="/static/path.png" mode=""></image>
							<text>软件规格:{{detailInfo.spec_name}}</text>
						</view>
						<view class="">

						</view>
					</view>

					<!-- <picker mode="selector" @change="bindPickerChange2" :range="installList" :range-key="'installContent'">
					<view class="flex-between " style="padding: 40rpx 20rpx 20rpx 20rpx">
						<view class="flex-start-center">
							<image class="versionTypeImg" src="/static/path11.png" mode=""></image>
							<text>{{install?install:'请选择你需要的服务'}}</text>
						</view>
						<view class="">
							<image class="rightImg" src="/static/arrowRight.png" mode=""></image>
						</view>
					</view>
				</picker> -->
					<view class="" v-if="activitType==0||activitType==2">
						<image class="imgProcess" src="/static/process.png" mode="aspectFill"></image>

					</view>

					<view class="v-share-padding text-align_center flex-column padding15" v-if="activitType==1">
						<view class="font-weight_bold " style="font-size: 32rpx;" maxParticipants
							v-if="maxParticipants==currentStep">

							拼团完成
						</view>
						<view class="font-weight_bold " style="font-size: 32rpx;" v-else>

							已有{{currentStep}}人拼团，仅剩 <text style="color: #EF3C2E;">{{participants}}</text>人拼成
						</view>
						<text
							style="color: #4A4A4A;padding: 20rpx 0;margin-bottom: 20rpx;">软件规格：{{detailInfo.spec_name}}</text>

						<view class="v-m-width not-font-overflow flex1 flex-between margin_10rpx_0"
							v-if="imgList.length">
							<block v-for="(item, index) in imgList.slice(0, 6)" :key="index">
								<image class="pt_img" :src="item"></image>
							</block>
						</view>

						<pro-gress :list="detailInfo.ladder_arr" :StepInfo="StepInfo"></pro-gress>
						<!-- notShow==1 为“未开始”团购 -->
						<!-- //活动状态 1 未开始 2 进行中 3 已结束 -->
						<block v-if="notShow == 2">
							<view class="flex-between v-p-share">
								<view class="v-m-width not-font-overflow flex1">
									<block v-for="(item, index) in detailInfo.peoples.slice(0, 8)" :key="index">
										<image class="pt_img" :src="item.avatar"></image>
									</block>
								</view>
								<view class="flex-align-center v-share-friend">
									<text>已有{{ detailInfo.pe_count }}人报名</text>
									<view class="flex v-btncss" v-if="!uid" @click="handleLogin()">分享好友</view>
									<button open-type="share" class="v-btncss" v-else>
										<view class="flex">分享好友</view>
									</button>
								</view>
							</view>
							<view class="v-share-bottom flex" v-if="timeEnd">
								<text>结束时间</text>
								{{ timeEnd }} 结束
							</view>
						</block>
						<block v-if="notShow == 3">
							<view class="flex-between v-p-share">
								<view class="v-m-width not-font-overflow flex1">
									<block v-for="(item, index) in detailInfo.peoples.slice(0, 12)" :key="index">
										<image class="pt_img" :src="item.avatar"></image>
									</block>
								</view>
								<view class="flex-align-center v-share-friend2">
									<text>已有{{ detailInfo.pe_count }}人报名</text>
								</view>
							</view>
						</block>
					</view>



				</view>
				<!-- 评价 -->

				<view class="evaluate margin-top_10rpx " v-if="activitType==0&&evaluateTotal">
					<view class="flex-between">
						<view class=" flex-start-center">
							<view class="font-weight_bold font-size_26rpx">
								评价({{evaluateTotal}})
							</view>
							<view class="margin-left_10rpx flex-align-center">
								<uni-rate :readonly="true" :value="percent_1" :max="5" size="18" activeColor="#FF5F4E"
									margin="5" />
								<view class="v-star-score">{{ (percent_1) }}</view>
							</view>
						</view>
						<view class="flex">
							<view class="" style="color: #999999;" @click="goEvaluateList()">
								查看全部
							</view>
							<view class="">
								<uni-icons color="#999999" type="right" size="20"></uni-icons>
							</view>
						</view>
					</view>

					<view class="flex-start-center margin-top_10rpx">
						<image class="imgIcon margin-right_16rpx" :src="evaluateObj.avatar" mode=""></image>
						<view class="flex-columns">
							<view class="" style="font-size: 28rpx;">
								{{evaluateObj.nickname}}
							</view>
							<view class="" style="color: #666666;font-size: 22rpx;margin-top: 10rpx;">
								{{evaluateObj.create_time}}
							</view>
						</view>
					</view>
					<view class="margin-top_30rpx ">
						<text style="color: #666666;width: 648rpx;" class="font-size_26rpx font-overflow2">
							{{evaluateObj.content}}
						</text>
					</view>


					<view class="flex-start-center-wrap  ">
						<view v-for="(img,indexs) in evaluateObj.pic_url" :key="indexs">
							<image style="width: 144rpx; height: 144rpx;margin-top: 30rpx;padding: 6rpx;" :src="img"
								@click.stop="imgScare(evaluateObj.pic_url,2,indexs)" mode="aspectFill">
							</image>
						</view>
					</view>



				</view>


				<view class="bargainPrice margin-top_30rpx flex-between" v-if="activitType==3">
					<view class="">
						<view class="font-weight_bold margin-bottom_20rpx">
							当前已有 <text style="color: #EA3337;">{{detailInfo.sold<5?'<5':detailInfo.sold}}</text>人参与砍价
						</view>
						<view class="flex-start-center margin-top_10rpx">
							<view class="flex-between v-p-share">
								<view class="v-m-width not-font-overflow flex1">
									<block v-for="(img, index) in imgList" :key="index">
										<image v-if="index<8" class="pt_img" :src="img"></image>
									</block>

								</view>

							</view>


						</view>
					</view>
					<!-- &&detailInfo.order_status -->
					<view class="joinNow flex" @click="immediatelyBargain()"
						v-if="detailInfo.order_id==0&&detailInfo.order_status==0">
						立即加入
					</view>
					<view class="joinNowNo flex" v-else>
						立即加入
					</view>

				</view>

				<view class="bargainingProgress text-align_center" v-if="activitType==3&&detailInfo.order_id!=0">
					<view class="font-weight_bold margin-bottom_20rpx">
						已砍<text>{{((Number(detailInfo.price)- Number(detailInfo.order_money))>(Number(detailInfo.price)- Number(detailInfo.money))?(Number(detailInfo.price)- Number(detailInfo.money)):(Number(detailInfo.price)- Number(detailInfo.order_money))).toFixed(2)}}</text>元，再砍<text
							style="color:#FF0000 ;">{{(((Number(detailInfo.order_money)- Number(detailInfo.money))<0)?(Number(0)):(Number(detailInfo.order_money)- Number(detailInfo.money))).toFixed(2)}}</text>元获得最低价
					</view>
					<view style="margin-top: 5rpx; " class="margin_20rpx_0 flex">
						<cc-countdown color="#FF1200" background-color="#FFE8E8" splitorColor="#FF1200"
							:showColon="true" :showDay="true" :day="detailInfo.timeDifference.days"
							:hour="detailInfo.timeDifference.hours" :minute="detailInfo.timeDifference.minutes"
							:second="detailInfo.timeDifference.seconds" @timeup="timeup"></cc-countdown>
						<view class="margin-left_10rpx" style="color: #EC486B;">
							后结束
						</view>
					</view>
					<view class="margin_20rpx_0">
						<ai-progress v-if="detailInfo.price"
							:percentage="((Number(detailInfo.price)- Number(detailInfo.order_money))>(Number(detailInfo.price)- Number(detailInfo.money))?(Number(detailInfo.price)- Number(detailInfo.money)):(Number(detailInfo.price)- Number(detailInfo.order_money))).toFixed(2)"
							:is-animate="true" :totalNum="Number(detailInfo.price)-Number(detailInfo.money)"
							duration="3000"></ai-progress>

					</view>
					<view class="" style="color: #FF0000;">
						点击下方按钮，邀请好友立即砍价拿到
					</view>
				</view>

				<view class="v-height"></view>
				<!-- 产品参数/版本更新/用户评价 -->
				<view class="desc">
					<type typeId="1" :navIndex="navIndex" :typeList="typeList" :ids="id" :richText="detailInfo.detail"
						:softwareDesc="softwareDesc" ref="types"></type>
				</view>




				<!-- 定位 ‘分享’ 图标 -->
				<!-- 	<view class="flex-column v-fixed">
				<view class="flex-column v-icon2" @click="share()">
					<image src="/static/forward.png"></image>
					<view>分享</view>
				</view>
			
				<button class="btncss v-icon2" style="	background-color: rgb(85 0 0 / 0%);" @click="$sun.kf">
					<view class="flex-column v-icon">
						<image src="/static/customerService.png"></image>
						<view>客服</view>
					</view>
				</button>
				<view class="flex-column v-icon" @click="popClick()">
					<image src="/static/eram.png"></image>
					<view style="margin-top: 6rpx;">进群</view>
				</view>
			</view> -->
				<!-- 修改测试是否需要 -->
				<!-- <view style="height: 120rpx;"></view> -->
				<!-- 底部button -->
				<view class="v-bottom-fixed flex-align-center">

					<view class="flex-column v-icon" @click="toIndex()">
						<image v-if="activitType==0" src="/static/tabbar/组合 3041.png"></image>
						<image v-else src="/static/tabbar/组合 2955.png"></image>

						<view>首页</view>
					</view>
					<button class="btncss" style="	background-color: rgb(85 0 0 / 0%); " @click="kfFn()">
						<view class="flex-column v-icon">
							<image src="/static/tabbar/组合 2963.png"></image>
							<view style="height: 34rpx;">客服</view>
						</view>
					</button>
					<view class="flex-column v-icon" v-if="activitType==0" @click="popClick()">
						<image src="/static/tabbar/组合 2953.png"></image>
						<view  v-if="activitType==0">进群</view>
					
					</view>
					<view class="flex-column v-icon" @click="share()" v-else>
						<image src="/static/tabbar/组合 2953.png"></image>
						
						<view  @click.stop="share()">分享</view>
					</view>
					
					<!-- <view class="flex-column v-cart" @click="share()">
					<image src="/static/forward2.png"></image>
					<view>分享赚</view>
				</view> -->
					<view class="flex-align-center margin_0_14rpx" v-if="activitType==0">
						<view class="shareFirend flex" @click.stop="share()">
							分享给好友
						</view>
						<view class="v-btn flex" @click.stop="buy()">立即购买</view>
					</view>
					<!-- 付尾款 -->

					<view class="groupbuyingBtn flex-column"
						v-if="activitType==1&&maxParticipants==currentStep&&!detailInfo.is_apply">

						<!-- 1-已报名 -->
						<text style="font-size: 25rpx;margin-top: 5rpx;">拼团已完成</text>




					</view>
					<view class="groupbuyingBtn flex-column"
						v-else-if="activitType==1&&maxParticipants==currentStep&&detailInfo.is_apply &&(detailInfo.order_status==1||detailInfo.order_status==2)"
						@click="finalPayment()">



						<view class="" style="color: #fff;">
							￥{{detailInfo.current_money}}
						</view>
						<view class="flex" style="color: #fff;">

							<text style="font-size: 20rpx;">还剩</text><uni-countdown @timeup="timeup"
								:day="detailInfo.timeOrderEnd.days" :hour="detailInfo.timeOrderEnd.hours"
								:minute="detailInfo.timeOrderEnd.minutes"
								:second="detailInfo.timeOrderEnd.seconds" /><text style="font-size:20rpx;">立即付款</text>




						</view>

					</view>
					<view class="groupbuyingBtn flex-column"
						v-else-if="activitType==1&&maxParticipants==currentStep&&detailInfo.is_apply &&(detailInfo.order_status==0||detailInfo.order_status==3||detailInfo.order_status==4||detailInfo.order_status==5||detailInfo.order_status==6)">



						<view class="" style="color: #fff;">
							该团购已参与，看看其他活动
						</view>


					</view>
					<view class="groupbuyingBtn flex-column"
						v-else-if="activitType==1&&maxParticipants!=currentStep&&detailInfo.is_apply &&(detailInfo.order_status==0||detailInfo.order_status==3||detailInfo.order_status==4||detailInfo.order_status==5||detailInfo.order_status==6)">



						<view class="" style="color: #fff;">
							该团购已参与，看看其他活动
						</view>


					</view>
					<view class="groupbuyingBtn flex-column"
						v-else-if="activitType==1&&detailInfo.is_apply &&(detailInfo.order_status==0)">



						<view class="" style="color: #fff;">
							订单取消，看看其他活动吧
						</view>


					</view>
					<view class="groupbuyingBtn flex-column"
						v-else-if="activitType==1&&detailInfo.is_apply &&(detailInfo.order_status==6)">



						<view class="" style="color: #fff;">
							已退款，去看看其他活动吧
						</view>


					</view>
					<view class="groupbuyingBtn flex-column" @click="finalPayment()"
						v-else-if="activitType==1&&(maxParticipants!=currentStep)&&detailInfo.is_apply">



						<view class="font-size_22rpx" style="color: #fff;">
							当前价￥{{detailInfo.current_money}}
						</view>
						<view class="font-size_22rpx margin-top_10rpx" style="color: #fff;">
							继续分享好友参与拼团
						</view>

					</view>
					<!-- 报名 -->
					<view class="groupbuyingBtn flex-column" v-else-if="activitType==1" @click.stop="registrationFee()">

						<!-- 1-已报名 -->
						<text
							style="font-size:28rpx;">{{detailInfo.is_apply?'当前价￥'+currentPrice:detailInfo.entry_fee!='0.00'?'报名费￥'+detailInfo.entry_fee:'免费报名'}}</text>




					</view>

					<view class="groupbuyingBtn flex-column" v-if="activitType==2" @click="buyNow()">



						<view class="" style="color: #fff;">
							<text style="font-size: 25rpx;">￥</text> <text
								style="font-size: 34rpx;">{{detailInfo.money}}</text>
						</view>
						<view class="flex" style="color: #fff;">

							<uni-countdown :day="detailInfo.timeDifference.days" :hour="detailInfo.timeDifference.hours"
								:minute="detailInfo.timeDifference.minutes"
								:second="detailInfo.timeDifference.seconds" /><text style="font-size:20rpx;">立即抢购</text>

						</view>

					</view>
					<!-- <view class="groupbuyingBtn flex-column" v-if="activitType==2"
						@click="buyNow()">



						<view class="" style="color: #fff;">
							￥{{detailInfo.money}}
						</view>
						<view class="flex" style="color: #fff;">

							<uni-countdown :day="detailInfo.timeDifference.days" :hour="detailInfo.timeDifference.hours"
								:minute="detailInfo.timeDifference.minutes"
								:second="detailInfo.timeDifference.seconds" /><text style="font-size:20rpx;">立即抢购</text>

						</view>

					</view> -->
					<!-- 	<view class="groupbuyingBtn flex-column"
						v-else-if="activitType==2&&detailInfo.order_status==1&&bargainStatus=='待付款'" @click="buyNow()">



						<view class="" style="color: #fff;">
							￥{{detailInfo.order_money}}
						</view>
						<view class="flex" style="color: #fff;">

							<text style="font-size: 20rpx;">还剩</text><uni-countdown @timeup="timeup"
								:day="detailInfo.timeOrderEnd.days" :hour="detailInfo.timeOrderEnd.hours"
								:minute="detailInfo.timeOrderEnd.minutes" :second="detailInfo.timeOrderEnd.seconds" /><text
								style="font-size:20rpx;">立即付款</text>

						</view>

					</view> -->


					<view class="groupbuyingBtn flex" v-if="activitType==3&&(detailInfo.money==detailInfo.order_money)"
						@click="inviteBargaining()">
						砍价完成，立即支付
					</view>
					<view class="groupbuyingBtn flex"
						v-else-if="activitType==3&&(detailInfo.order_status==3||detailInfo.order_status==4||detailInfo.order_status==5||detailInfo.order_status==6)">
						砍价完成，看看其他活动
					</view>
					<view class="groupbuyingBtn flex"
						v-else-if="activitType==3&&detailInfo.order_status==0&&bargainStatus=='取消付款'&&detailInfo.order_id!=0">
						订单已取消无法在参与
					</view>
					<view class="groupbuyingBtn flex"
						v-else-if="activitType==3&&detailInfo.order_status==1&&bargainStatus=='待付款'"
						@click="inviteBargaining()">
						<text style="font-size: 20rpx;">还剩</text><uni-countdown @timeup="timeup"
							:day="detailInfo.timeOrderEnd.days" :hour="detailInfo.timeOrderEnd.hours"
							:minute="detailInfo.timeOrderEnd.minutes" :second="detailInfo.timeOrderEnd.seconds" /><text
							style="font-size:20rpx;">立即付款</text>
					</view>
					<view class="groupbuyingBtn flex" v-else-if="activitType==3&&detailInfo.order_status==2"
						@click="inviteBargaining()">
						邀请好友来参加
					</view>
					<view class="groupbuyingBtn flex" v-else-if="activitType==3&&detailInfo.order_id==0"
						@click="immediatelyBargain()">
						立即参与
					</view>


					<view class="groupbuyingBtnNo flex" v-if="activitType==4&&detailInfo.sold==detailInfo.number">
						众筹完成
					</view>
					<view class="groupbuyingBtn flex" v-else-if="activitType==4&&detailInfo.order_id==0"
						@click="partCrowdfunding()">
						立即参与
					</view>
					<view class="groupbuyingBtn flex"
						v-else-if="activitType==4&&detailInfo.order_status==0&&bargainStatus=='取消付款'"
						@click="partCrowdfunding()">
						重新参与
					</view>
					<view class="groupbuyingBtn flex"
						v-else-if="activitType==4&&detailInfo.order_status==2&&bargainStatus=='待付款'"
						@click="partCrowdfunding()">
						众筹中请耐心等待
					</view>
					<view class="groupbuyingBtn flex"
						v-else-if="activitType==4&&detailInfo.order_status==1&&bargainStatus=='待付款'"
						@click="partNavgo()">
						<text style="font-size: 20rpx;">还剩</text><uni-countdown @timeup="timeup"
							:day="detailInfo.timeOrderEnd.days" :hour="detailInfo.timeOrderEnd.hours"
							:minute="detailInfo.timeOrderEnd.minutes" :second="detailInfo.timeOrderEnd.seconds" /><text
							style="font-size:20rpx;">立即付款</text>
					</view>

					<view class="groupbuyingBtn flex"
						v-else-if="activitType==4&&(detailInfo.order_status==3||detailInfo.order_status==4||detailInfo.order_status==5||detailInfo.order_status==5||detailInfo.order_status==6)">
						活动已参与，看看其他活动
					</view>



				</view>
				<!-- 领取优惠券 -->
				<sunui-popup ref="popcoupon">
					<template v-slot:content>
						<view class="v-pop-coupon">
							<view class="v-coupon-tilte flex">优惠明细</view>
							<!-- <view class="v-discount">优惠</view> -->
							<scroll-view scroll-y :style="list && Number(list.length) > 0 ? 'height:524rpx;' : ''">
								<block v-for="(item, index) in list" :key="index">
									<view class="flex-between v-coupons">
										<view class="flex-align-center v-left">
											<view class="flex-column">
												<view class="v-coupon-price">￥{{ item.less_money }}</view>
												<view class="v-identification" v-if="item.coupon_type == 2">无门槛</view>
											</view>
											<view class="flex-columns v-conditions-met flex1">
												<view class="v-bold">
													{{ item.coupon_type == 1 ? '满' + item.meet_money + '可用' : item.name }}
												</view>
												<text>有效期至 {{ item.update_time }}</text>
											</view>
										</view>
										<view class="v-coupon-btn flex" @click="receive(item.id)">领取</view>
									</view>
								</block>
							</scroll-view>
							<view class="width100 flex">
								<view class="v-coupon-close flex" @click="couponClose()">关闭</view>
							</view>
						</view>
					</template>
				</sunui-popup>
				<!-- 分享 -->
				<sunui-popup ref="pop">
					<template v-slot:content>
						<view class="v-pop flex-column">
							<view class="width100">
								<view class="flex-between v-pop-margin">
									<view class="flex-column v-select-type" @click="cancel()">
										<button open-type="share" class="btncss">
											<view class="flex">
												<image src="/static/share/shareWx.png"></image>
											</view>
										</button>
										<text>分享给朋友</text>
									</view>
									<view class="flex-column v-select-type" @click="poster()">
										<view class="flex">
											<image src="/static/share/shareImg.png"></image>
										</view>
										<text>生成海报</text>
									</view>
								</view>
							</view>
							<view class="v-cancel flex" @click="cancel()">取消</view>
						</view>
					</template>
				</sunui-popup>
				<sunui-popup ref="popKf">
					<template v-slot:content>
						<view class="v-popKf flex-column">
							<view class="v-pop-phone flex" @click="call()">
								<image src="/static/my/phone.png"></image>
								{{ kfPhone }}
							</view>
							<view class="v-cancel flex" @click="cancelKf()">取消</view>
						</view>
					</template>
				</sunui-popup>
				<!-- 二维码 -->
				<sunui-popup ref="popCode">
					<template v-slot:content>
						<view class="v-pop-code">
							<view class="flex-column v-qr-code">

								<image :show-menu-by-longpress="true" mode="aspectFill" :src="kfImg"
									@click="previewImage">
								</image>
								<text>扫一扫或长按保存扫码进群</text>
							</view>
							<view class="flex" @click="popCodeClose">
								<image class="v-close-img" src="/static/close.png"></image>
							</view>
						</view>
					</template>
				</sunui-popup>
				<!-- 立即购买 -->
				<sunui-popup ref="popbuy">
					<template v-slot:content>
						<view class="v-pop-buy">
							<view class="flex-align-center v-spec-all">
								<image :src="detailInfo.pic_url"></image>
								<view class="flex-columns v-spec-name">
									<text>{{ detailInfo.name }}</text>
									<text
										style="margin-top: 20rpx;color: #999999;font-size: 26rpx;font-weight: 500;">已选：{{ moneyItem.name }}</text>
									<view class="v-price flex">
										￥
										<text style="margin-right: 30rpx;">{{ moneyItem.money*numberBox }}</text>
										<uv-number-box v-model="numberBox" @change="valChange">
											<template v-slot:minus>
												<view class="minus">
													<uv-icon name="minus" size="12">
													</uv-icon>
												</view>
											</template>
											<template v-slot:input>
												<text style="width: 100rpx;text-align: center; color: #999999;"
													class="input">
													{{numberBox}}
												</text>
											</template>
											<template v-slot:plus>
												<view class="plus">
													<uv-icon name="plus" color="#FFFFFF" size="12">
													</uv-icon>
												</view>
											</template>
										</uv-number-box>
										<!-- <uv-number-box v-model="numberBox" @change="valChange"></uv-number-box> -->
									</view>
									<!-- <view>规格价：{{moneyItem.p_price}}</view> -->
								</view>

							</view>
							<!-- 商品规格 -->
							<view class="v-specname">商品规格</view>
							<scroll-view scroll-y="true" style="height: 352rpx;">
								<view class="flex-wrap" style="margin-right: 38rpx;">
									<block v-for="(item, index) in norms" :key="index">
										<view class="v-p-bj flex-column"
											:class="tabIndex == index ? 'v-p-bj2' : 'v-p-bj1'"
											@click="specClick(index, item)">
											<text>{{ item.name }}</text>
										</view>
									</block>

								</view>
							</scroll-view>
							<view style="height: 106rpx;"></view>
							<view class="v-confirm flex" @click="confirm()">立即购买</view>
						</view>
					</template>
				</sunui-popup>
			</mescroll-body>
		</uv-skeletons>
	</view>
</template>

<script>
	function unparam(str = '', unDecodeURI) {
		const [goods_id, type, uid] = str.split('_').map(Number); // 将字符串按下划线分割，并转换为数字
		return {
			goods_id,
			type,
			uid
		};
		// let result = {};
		// let arr = str.split('&');
		// arr.forEach((item, idx) => {
		// 	let param = item.split('='),
		// 		name = param[0],
		// 		value = param[1] || '';
		// 	if (name) {
		// 		result[name] = unDecodeURI ? value : decodeURIComponent(value);
		// 	}
		// });

		// return result;
	}
	import aiProgress from '@/components/ai-progress/ai-progress.vue'
	import proGress from '@/components/progress/progress.vue';
	import antiThrottling from '@/utils/antiThrottling.js';
	export default {
		components: {
			proGress,
			aiProgress
		},
		data() {

			return {
				imgList: [
					'/static/avatar.png',
					'/static/avatar.png',
					'/static/avatar.png',
					'/static/avatar.png',
					'/static/avatar.png',
					'/static/avatar.png',
				],
				user: uni.getStorageSync('user')?uni.getStorageSync('user'):'',
				numberBox: 1,
				norms: [],
				notShow: 0,
				copywritingList: [{
					id: 1,
					copywritingContent: '加密版'
				}, {
					id: 2,
					copywritingContent: '独力多开版'
				}],
				installList: [{
					id: 1,
					installContent: '48小时内全程一对一技术支持'
				}, {
					id: 2,
					installContent: '不需要技术支持'
				}],
				copywriting: '',
				install: '',
				tabIndex: 0,
				moneyItem: {},
				uid: uni.getStorageSync('uid'),
				// 佣金
				commission: 0,

				distributionSet: uni.getStorageSync('system').distributionSet,
				// 系统设置:客服二维码
				kfImg: uni.getStorageSync('kfSet').kf_qrcode,
				// 软件声明
				softwareDesc: uni.getStorageSync('software').protocol,

				// 优惠券列表
				list: [],

				// 评分
				percent_1: 0,
				// 商品詳情
				detailInfo: {},
				carousel: [],
				// 产品id
				id: '',
				navIndex: 0,
				// 产品列表
				typeList: [],
				// 分销传入的pid2
				pid2: '',

				options: {},

				options2: {},
				scene: '',
				activitType: '',

				kfPhone: uni.getStorageSync('kfSet').kf_phone,
				activeKjPoster: this.$imgs.rectangle2942,
				activePtPoster: this.$imgs.rectangle5422,
				activeZcPoster: this.$imgs.group2942,
				activeMsPoster: this.$imgs.kanjia,
				Steps: [],
				StepInfo: {

				},
				currentStep: '',
				participants: '',
				// 当前价格
				currentPrice: '',
				evaluateObj: {},
				evaluateTotal: '',
				itemAll: null,
				maxParticipants: '',
				imgList: [],
				// 砍价状态
				bargainStatus: '',
				cc: 0,
				bili: '',
				dd: 0,
				out: "",
				loading: true,
				skeleton: [{
						type: 'flex',
						num: 1,
						children: [{
							type: 'custom',
							num: 1,
							style: 'width:136rpx;height:136rpx;marginRight: 30rpx;background-color: #fff'
						}, {
							type: 'line',
							num: 3,
							style: [null, 'width:360rpx;', 'width:200rpx;', 'background-color: #fff']
						}]
					}, 30, {
						type: 'flex',
						num: 1,
						children: [{
							type: 'custom',
							num: 1,
							style: 'width:136rpx;height:136rpx;marginRight: 30rpx;background-color: #fff'
						}, {
							type: 'line',
							num: 3,
							style: [null, 'width:360rpx;', 'width:200rpx;', 'background-color: #fff']
						}]
					},
					30, {
						type: 'flex',
						children: [{
							type: 'custom',
							style: 'width:198rpx;height:160rpx;background-color: #fff'
						}, {
							type: 'custom',
							style: 'width:198rpx;height:160rpx;marginLeft:50rpx;background-color: #fff'
						}, {
							type: 'custom',
							style: 'width:198rpx;height:160rpx;marginLeft:50rpx;background-color: #fff'
						}]
					},
					30, {
						type: 'flex',
						children: [{
							type: 'custom',
							style: 'width:198rpx;height:160rpx;background-color: #fff'
						}, {
							type: 'custom',
							style: 'width:198rpx;height:160rpx;marginLeft:50rpx;background-color: #fff'
						}, {
							type: 'custom',
							style: 'width:198rpx;height:160rpx;marginLeft:50rpx;background-color: #fff'
						}]
					},
					30, {
						type: 'flex',
						children: [{
							type: 'custom',
							style: 'width:198rpx;height:160rpx;background-color: #fff'
						}, {
							type: 'custom',
							style: 'width:198rpx;height:160rpx;marginLeft:50rpx;background-color: #fff'
						}, {
							type: 'custom',
							style: 'width:198rpx;height:160rpx;marginLeft:50rpx;background-color: #fff'
						}]
					},
					30, {
						type: 'flex',
						children: [{
							type: 'custom',
							style: 'width:198rpx;height:160rpx;background-color: #fff'
						}, {
							type: 'custom',
							style: 'width:198rpx;height:160rpx;marginLeft:50rpx;background-color: #fff'
						}, {
							type: 'custom',
							style: 'width:198rpx;height:160rpx;marginLeft:50rpx;background-color: #fff'
						}]
					},
					30, {
						type: 'flex',
						children: [{
							type: 'line',
							num: 3,
							gap: '30rpx'
						}, {
							type: 'custom',
							style: 'width:160rpx;height:160rpx;marginLeft: 30rpx;background-color: #fff'
						}]
					},
					30, {
						type: 'flex',
						children: [{
							type: 'line',
							num: 3,
							gap: '30rpx'
						}, {
							type: 'custom',
							style: 'width:160rpx;height:160rpx;marginLeft: 30rpx;background-color: #fff'
						}]
					}
				]

			};
		},
		onLoad(options) {
          
			this.loading = true
			if (!uni.getStorageSync('uid')) {
				// 右上角三个点分享禁用分享
				wx.hideShareMenu();
			}

			// unparam转对象
			let result = decodeURIComponent(options.scene);
			console.log(result, '=========================================================result')
			// 二维码扫码获取到的
			this.options = unparam(result);
			console.log(this.options, '=========================================================this.options')
			// 自己的（非二维码获取）
			this.options2 = options;
			if (result) {
				this.activitType = this.options.type
			}
			this.id = this.options.goods_id ? this.options.goods_id : this.options2.goods_id;
			if (this.options.uid || this.options2.uid) {
				this.pid2 = this.options.uid ? this.options.uid : this.options2.uid;
				uni.setStorageSync('pid', this.pid2);
			}
			if (!uni.getStorageSync('system')) {
				this.system();
			}
			// 活动类型 1团购 2秒杀 3砍价
			this.activitType = this.options2.type
			// console.log(this.activitType, '==================')
			this.getProtocol()

			if (this.activitType == 1) {
				this.grouponGoodsDetail()

			} else if (this.activitType == 2) {
				this.seckillGoodsDetail()
			} else if (this.activitType == 3) {
				this.bargainsGoodsDetail()
			} else if (this.activitType == 4) {
				this.presellGoodsDetail()
			} else {
				this.evaluateListFn()
				this.getDetail();
			}
			setTimeout(() => {
				this.randomUserFn()

				this.loading = false
			}, 1500)
			  this.userInfos();

		},
		onShow() {
			this.userInfos();
			this.uid = uni.getStorageSync('uid');
			antiThrottling.releaseKey('submit');
			this.$nextTick(() => {
				this.mescroll?.resetUpScroll();
			})

		},
		methods: {
			async userInfos() {
				const result = await this.$http.get({
					url: this.$api.userInfo,
					data: {
						// 用户id
						uid: uni.getStorageSync('uid'),
						// 上级id
						pid: '',
			
					}
				});
				if (result.errno == 0) {
					uni.setStorageSync('user', result.data);
			
				}
			},
			
			kfFn() {

				if (uni.getStorageSync('kfSet').kf_type == 1) {
					// 弹电话
					this.$refs.popKf.show({
						anim: 'bottom',
						position: 'bottom',
						shadeClose: true, //false使用户不能点击其它关闭页面
						topclose: false,
						shade: false,
					});
				} else {
					this.$sun.kf()
				}


			},
			// 拨打电话
			call() {
				this.$sun.phone(uni.getStorageSync('kfSet').kf_phone);
			},
			// "客服联系" 取消按钮
			cancelKf() {
				this.$refs.popKf.close();
			},
			async templateTpo() {

				wx.requestSubscribeMessage({
					tmplIds: [uni.getStorageSync("templateSet").apply_success_template, uni.getStorageSync(
							"templateSet").pay_success_template, uni.getStorageSync("templateSet")
						.pay_wait_template
					],
					success: res => { //成功、
						if (res[Object.keys(res)[0]] == "accept") {
							console.log(res)
							// this.$sun.toast("成功订阅")
						} else {
							uni.showModal({
								title: "温馨提示",
								content: "点击右上角的「...」按钮，找到「订阅消息」相关选项，并设定为「接收」状态方可再次订阅"
							})
						}
					},
					fail: err => { //失败
						this.$sun.toast("订阅消息配置失败");
					}
				})

			},
			timeup() {
				setTimeout(() => {
					if (this.activitType == 1) {
						this.grouponGoodsDetail()

					} else if (this.activitType == 2) {
						this.seckillGoodsDetail()
					} else if (this.activitType == 3) {
						this.bargainsGoodsDetail()
					} else if (this.activitType == 4) {
						this.presellGoodsDetail()
					} else {
						this.evaluateListFn()
						this.getDetail();
					}
				}, 1000)
			},

			inviteBargaining() {
				if(this.detailInfo.timeOrderEnd.des=='取消付款'&&this.detailInfo.timeDifference.seconds<0){
					this.$sun.toast('当前活动已结束无法付款','none')
				}else{
					this.$sun.navGo('/pages/activityPgae/bargainAssistancePage')
				}
				
			},
			// 参与砍价
			immediatelyBargain() {
				// 判断当前是否已过期
				console.log(this.detailInfo.timeOrderEnd.des )
				if(this.detailInfo.timeOrderEnd.des=='取消付款'&&this.detailInfo.timeDifference.seconds<0){
					this.$sun.toast('当前活动已结束','none')
				}else{
					this.templateTpo()
					uni.showModal({
						title: '提示',
						content: '是否参与砍价',
						success: async (res) => {
							if (res.confirm) {
					
								const result = await this.$http.get({
									url: this.$api.bargainsBargainsApply,
									data: {
										uid: uni.getStorageSync('uid'),
										bargains_id: this.detailInfo.id
									}
								});
								if (result.errno == 0) {
					
									this.$nextTick(() => {
										this.mescroll?.resetUpScroll();
									})
					
								} else {
									this.$sun.toast(result.message);
								}
							} else if (res.cancel) {
					
							}
						}
					});
				}
				


			},
			// 商城设置_协议
			async getProtocol() {
				const result = await this.$http.get({
					url: this.$api.mallSet,
					data: {}
				});
				if (result.errno == 0) {
					this.protocolInfo = result.data;

					// console.log('商城设置_协议', result.data, result.data.protocol);
					uni.setStorageSync('software', this.protocolInfo);


				} else {
					this.$sun.toast(result.message);
				}
			},
			async randomUserFn() {
				if( this.detailInfo.sold){
					const result = await this.$http.get({
						url: this.$api.randomUser,
						data: {
							psize: this.detailInfo.sold>12?12: this.detailInfo.sold
					
						}
					});
					if (result.errno == 0) {
					
						console.log(result.data)
						this.imgList = result.data
					
					}
				}

			},
			async registrationFee() {
				if(this.detailInfo.timeOrderEnd.des=='取消付款'&&this.detailInfo.timeDifference.seconds<0){
					this.$sun.toast('当前活动已结束无法付款','none')
				}else{
					this.templateTpo()
					uni.showModal({
						title: '提示',
						content: '是否参与报名',
						success: async (res) => {
							if (res.confirm) {
					
								antiThrottling.uniDoFunc({
									// 键名
									key: 'submit',
									success: async () => {
										//锁定
										antiThrottling.lockKey('submit');
					
										console.log('111')
					
										const result = await this.$http.get({
											url: this.$api.grouponApply,
											data: {
												groupon_id: this.id,
												uid: uni.getStorageSync('uid'),
					
					
											}
										});
										if (result.errno == 0) {
					
											this.itemAll = result.data;
											console.log(this.itemAll)
											if (this.detailInfo.entry_fee !== '0.00') {
												this.applyOrder(this.itemAll);
											} else {
												this.grouponGoodsDetail()
					
												this.$sun.toast(result.message, 'none')
											}
					
					
					
										}else{
											this.$sun.toast(result.message, 'none')
										}
									}
								});
							} else if (res.cancel) {
					
							}
						}
					});
				}
				

			},
			// 生成订单后——支付
			applyOrder(number) {
				this.pays(this.itemAll);
			},
			// 支付
			async pays(item) {
				const result = await this.$http.get({
					url: this.$api.wxPay,
					data: {

						// 支付金额
						price: this.detailInfo.entry_fee,
						// 订单编号
						log_no: item,
						// opid
						openid: wx.getStorageSync('user').openid,

						name: this.detailInfo.name ? this.detailInfo.name : this.detailInfo.goods_name
					}
				});
				if (result.errno == 0) {
					this.$sun.title('支付');
					const pay = result.data;
					this.$sun.wePay(
						pay,
						async success => {
								antiThrottling.releaseKey('submit');
								// false 普通商品 true团购商品
								// this.$sun.navRe('/pages/orderMessage/orderDetail/orderDetail');
								if (this.activitType == 1) {
									if (this.activitType == 1 && (this.maxParticipants != this.currentStep) && this
										.detailInfo.is_apply) {
										this.$sun.toast('如果需要付款请在订单中查看', 'none', 3000)
									}
									this.grouponGoodsDetail()
								} else if (this.activitType == 2) {
									this.seckillGoodsDetail()
								} else {

								}

							},
							async cancel => {
								this.$sun.toast('取消了支付');
								antiThrottling.releaseKey('submit');

							}
					);
				} else {
					this.$sun.toast(result.message);
					antiThrottling.releaseKey('submit');
				}
			},
			async evaluateListFn() {
				// 评论列表
				const result = await this.$http.get({
					url: this.$api.evaluateList,
					data: {
						page: 1,
						psize: 1,
						goods_id: this.id,
						// uid: uni.getStorageSync('uid'),


					}
				});
				if (result.errno == 0) {
					console.log(result.data.list[0])
					this.evaluateObj = result.data.list[0]
					this.evaluateTotal = result.data.total


				}
			},
			formatTimeDifferenceOrder(timestamp) {
				// 获取当前时间的时间戳（以秒为单位）
				const currentTimestamp = Math.floor(Date.now() / 1000);

				// 计算时间差（以秒为单位）
				let timeDifference = timestamp - currentTimestamp;

				// 如果时间差是负数，表示目标时间已经过去，返回0
				if (timeDifference < 0) {
					return {
						days: '00',
						hours: '00',
						minutes: '00',
						seconds: '00',
						des: '取消付款'
					};
				}

				// 计算天数
				const days = Math.floor(timeDifference / (24 * 60 * 60));
				timeDifference %= (24 * 60 * 60);

				// 计算小时
				const hours = Math.floor(timeDifference / (60 * 60));
				timeDifference %= (60 * 60);

				// 计算分钟
				const minutes = Math.floor(timeDifference / 60);

				// 剩余的秒数
				const seconds = timeDifference % 60;

				// 返回格式化后的时间差
				return {
					days: days,
					hours: hours,
					minutes: minutes,
					seconds: seconds,
					des: '待付款'
				};
			},




			formatTimeDifference(timestamp) {
				// 获取当前时间的时间戳（以秒为单位）
				const currentTimestamp = Math.floor(Date.now() / 1000);

				// 计算时间差（以秒为单位）
				let timeDifference = timestamp - currentTimestamp;

				// 计算天数
				const days = Math.floor(timeDifference / (24 * 60 * 60));
				timeDifference %= (24 * 60 * 60);

				// 计算小时
				const hours = Math.floor(timeDifference / (60 * 60));
				timeDifference %= (60 * 60);

				// 计算分钟
				const minutes = Math.floor(timeDifference / 60);

				// 剩余的秒数
				const seconds = timeDifference % 60;

				return {
					days: days,
					hours: hours,
					minutes: minutes,
					seconds: seconds
				};
			},
			imgScare(img, len, index) {
				console.log(img)

				if (len == 1) {
					uni.previewImage({
						urls: [img],
						longPressActions: {
							itemList: ['发送给朋友', '保存图片', '收藏'],
							success: function(data) {

							},
							fail: function(err) {

							}
						}
					});
				} else {
					uni.previewImage({
						urls: img,
						current: index,
						longPressActions: {
							itemList: ['发送给朋友', '保存图片', '收藏'],
							success: function(data) {

							},
							fail: function(err) {

							}
						}
					});
				}


			},
			valChange(e) {
				console.log('当前值为: ' + e.value)
			},
			joinNowCk() {
				this.$sun.navGo('/pages/activityPgae/bargainAssistancePage')
			},
			bindPickerChange4(e) {
				console.log(e, this.copywritingList)
				// this.form.copywriting = this.copywritingList[e.detail.value].id; 
				this.copywriting = this.copywritingList[e.detail.value].copywritingContent //POI地址名称
			},
			bindPickerChange2(e) {
				console.log(e, this.installList)
				// this.form.install = this.installList[e.detail.value].id; 
				this.install = this.installList[e.detail.value].installContent //POI地址名称
			},
			// 选择规格
			specClick(index, item) {
				this.tabIndex = index;
				this.moneyItem = item;
			},
			previewImage(e) {
				uni.previewImage({
					// 需要预览的图片链接列表
					urls: [],
					// 为当前显示图片的链接/索引值
					current: '/static/mp-weixin/qrCode.jpg',
					// 图片指示器样式
					indicator: 'default',
					// 是否可循环预览
					loop: false,
					// 长按图片显示操作菜单，如不填默认为保存相册
					// longPressActions:{
					// 	itemList:[this.l('发送给朋友'),this.l]
					// },
					success: res => {
						console.log('res', res);
					},
					fail: err => {
						onsole.log('err', err);
					}
				});
			},
			// 系统设置
			async system() {
				const result = await this.$http.get({
					url: this.$api.system
				});
				if (result.errno == 0) {
					let systemInfo = result.data;
					// this.indexAdid = result.data.bar_app_id;
					// 系统设置:客服二维码
					// this.kfImg = systemInfo.kf_img;
					// this.distributionSet = systemInfo.distributionSet;



					uni.setStorageSync('system', result.data);
				}
			},
			// 判断登录
			handleLogin() {
				if (this.uid) {
					return true;
				} else {
					uni.navigateTo({
						url: `/pages/login/login`
					});
				}
			},
			/* api */

			// 优惠券列表
			async upCallback(scroll) {
				this.mescroll.endByPage(1, 10);
				if (this.activitType == 1) {
					this.grouponGoodsDetail()

				} else if (this.activitType == 2) {
					this.seckillGoodsDetail()
				} else if (this.activitType == 3) {
					this.bargainsGoodsDetail()
				} else if (this.activitType == 4) {
					this.presellGoodsDetail()
				} else {
					this.evaluateListFn()
					this.getDetail();
				}
				 this.userInfos();
				 this.randomUserFn()


			},
			// 秒杀详情

			async seckillGoodsDetail() {
				const result = await this.$http.get({
					url: this.$api.seckillGoodsDetail,
					data: {
						// 用户id
						uid: uni.getStorageSync('uid'),
						// 产品id
						seckill_id: this.id,

					}
				});
				if (result.errno == 0) {
					this.detailInfo = result.data;

					// 选择规格
					this.detailInfo.timeDifference = this.formatTimeDifference(this.detailInfo.end_time)
					this.detailInfo.timeOrderEnd = this.formatTimeDifferenceOrder(this.detailInfo.order_end)
					this.bargainStatus = this.formatTimeDifferenceOrder(this.detailInfo.order_end).des
					console.log('秒杀倒计时', this.detailInfo.timeDifference)

					this.carousel = [this.detailInfo.pic_url];
					this.typeList = [{
							name: '最近更新',
							content: this.detailInfo.update_time
						},
						{
							name: '发布时间',
							content: this.detailInfo.create_time
						},
						{
							name: '开发者',
							content: this.detailInfo.developer,
							letter: 5
						},

						{
							name: '交付方式',
							content: this.detailInfo.give_type
						},
						{
							name: '源码加密',
							content: this.detailInfo.encrypt_type
						},
						// { name: '适用类型', content: this.detailInfo.app_type == 1 ? '小程序' : this.detailInfo.app_type == 2 ? '公众号' : 'app' },
						{
							name: '适用类型',
							content: this.detailInfo.apply_platform
						},
						{
							name: '支持语言',
							content: this.detailInfo.development_language,
							letter: 5
						},

					];
					// // 增加浏览量
					// this.addBrowse();
				}

			},
			// 众筹详情
			async presellGoodsDetail() {
				const result = await this.$http.get({
					url: this.$api.presellGoodsDetail,
					data: {
						// 用户id
						uid: uni.getStorageSync('uid'),
						// 产品id
						presell_id: this.id,

					}
				});
				if (result.errno == 0) {
					this.detailInfo = result.data;

					// 选择规格
					this.detailInfo.timeDifference = this.formatTimeDifference(this.detailInfo.end_time)
					this.detailInfo.timeOrderEnd = this.formatTimeDifferenceOrder(this.detailInfo.order_end)
					this.bargainStatus = this.formatTimeDifferenceOrder(this.detailInfo.order_end).des
					console.log('秒杀倒计时', this.detailInfo.timeDifference, this.bargainStatus)

					this.carousel = [this.detailInfo.pic_url];
					this.typeList = [{
							name: '最近更新',
							content: this.detailInfo.update_time
						},
						{
							name: '发布时间',
							content: this.detailInfo.create_time
						},
						{
							name: '开发者',
							content: this.detailInfo.developer,
							letter: 5
						},

						{
							name: '交付方式',
							content: this.detailInfo.give_type
						},
						{
							name: '源码加密',
							content: this.detailInfo.encrypt_type
						},
						// { name: '适用类型', content: this.detailInfo.app_type == 1 ? '小程序' : this.detailInfo.app_type == 2 ? '公众号' : 'app' },
						{
							name: '适用类型',
							content: this.detailInfo.apply_platform
						},
						{
							name: '支持语言',
							content: this.detailInfo.development_language,
							letter: 5
						},

					];
					// // 增加浏览量
					// this.addBrowse();
				}
			},
			// 砍价详情
			async bargainsGoodsDetail() {
				const result = await this.$http.get({
					url: this.$api.bargainsGoodsDetail,
					data: {
						// 用户id
						uid: uni.getStorageSync('uid'),
						// 产品id
						bargains_id: this.id,

					}
				});
				if (result.errno == 0) {
					this.detailInfo = result.data;

					// 选择规格
					this.detailInfo.timeDifference = this.formatTimeDifference(this.detailInfo.end_time)
					this.detailInfo.timeOrderEnd = this.formatTimeDifferenceOrder(this.detailInfo.order_end)
					this.bargainStatus = this.formatTimeDifferenceOrder(this.detailInfo.order_end).des
					// 当前砍价状态


					console.log(this.detailInfo.timeOrderEnd)
					console.log('秒杀倒计时', this.detailInfo.timeDifference)

					this.carousel = [this.detailInfo.pic_url];
					this.typeList = [{
							name: '最近更新',
							content: this.detailInfo.update_time
						},
						{
							name: '发布时间',
							content: this.detailInfo.create_time
						},
						{
							name: '开发者',
							content: this.detailInfo.developer,
							letter: 5
						},

						{
							name: '交付方式',
							content: this.detailInfo.give_type
						},
						{
							name: '源码加密',
							content: this.detailInfo.encrypt_type
						},
						// { name: '适用类型', content: this.detailInfo.app_type == 1 ? '小程序' : this.detailInfo.app_type == 2 ? '公众号' : 'app' },
						{
							name: '适用类型',
							content: this.detailInfo.apply_platform
						},
						{
							name: '支持语言',
							content: this.detailInfo.development_language,
							letter: 5
						},

					];
					// // 增加浏览量
					// this.addBrowse();
				}
			},
			async grouponGoodsDetail() {
				const result = await this.$http.get({
					url: this.$api.grouponGoodsDetail,
					data: {
						// 用户id
						uid: uni.getStorageSync('uid'),
						// 产品id
						groupon_id: this.id,

					}
				});
				if (result.errno == 0) {
					this.detailInfo = result.data;
					this.detailInfo.ladder_arr = this.detailInfo.ladder_arr.map((item) => {
						return {
							p_price: item.money,
							p_number: item.p_number
						}
					})




					// =============================================================
					// 进度/步骤条 start
					this.cc = 0
					this.bili = 0
					this.dd = 0
					this.out = 0

					if (this.detailInfo.ladder_arr && this.detailInfo.ladder_arr.length > 0) {
						let obj = {
							p_number: '0',
							p_price: this.detailInfo.price
						};
						this.detailInfo.ladder_arr.unshift(obj);
						// ==================================================================================
						const index = this.detailInfo.ladder_arr.findIndex((item) => {
							return item.p_price == this.detailInfo.current_money
						})
						let currentStep = this.detailInfo.ladder_arr.find((step) => step.p_price == this.detailInfo
							.current_money); // 获取当前步骤

						// // ==============测试
						// let p_number = 4; //参团人数
						// this.maxParticipants = 7; // 最大人数为7
						// let baseParticipants = 3; //当前步骤baseParticipants
						// // =======================================


						// // 设定人数和百分比的关系
						this.maxParticipants = this.detailInfo.max_number; // 最大人数为7
						let baseParticipants = parseInt(currentStep.p_number); // 基础人数为5时百分比为50%
						let p_number = this.detailInfo.sold; // 获取当前步骤的参与人数



						// // 已有多少人参团
						this.currentStep = this.detailInfo.sold;
						// 剩余多少人参团 participants
						this.currentPrice = this.detailInfo.ladder_arr[index].p_price
						// 当前价格是多少

						this.participants = this.detailInfo.max_number - this.currentStep
						// ==================================================================================

						// 在步骤条添加“首条数据”为空

						this.Steps = this.detailInfo.ladder_arr;
						this.detailInfo.pe_count = this.detailInfo.sold;
						for (let i = 0; i < this.Steps.length; i++) {
							// 计算已完成的步骤条数
							if (Number(this.detailInfo.pe_count) >= Number(this.Steps[i].p_number)) {
								this.cc++;
							}
							if (Number(this.Steps[i].p_number) >= Number(this.detailInfo.pe_count) && this.detailInfo
								.pe_count > 0) {
								// 下一个计数
								this.out = this.Steps[i].p_number;
								// 上一个
								let previous = this.Steps[i - 1].p_number;
								if (this.detailInfo.pe_count != this.Steps[i].p_number && this.detailInfo.pe_count <
									this.Steps[this.Steps.length - 1].p_number) {
									this.bili = (Number(this.detailInfo.pe_count) - Number(previous)) / (Number(this
										.out) - Number(previous));
									// 每段的百分比*比例
									this.dd = (100 / (Number(this.Steps.length) - 1)) * this.bili;
								} else {
									this.dd = 0;
								}
								break;
							}
						}

						if (this.detailInfo.pe_count < this.Steps[this.Steps.length - 1].p_number) {
							this.Steps[this.Steps.length - 1].p_price = '待揭晓';
						}
						let allSum = Number(this.detailInfo.ladder_arr[this.detailInfo.ladder_arr.length - 1]
							.p_number);
						// 步骤比率（非百分比）
						let ratio = this.detailInfo.pe_count / allSum;
						// 当前步骤=总步骤*步骤比率
						let currents = this.detailInfo.ladder_arr.length * ratio;
						let aa = Number(this.cc - 1);
						let zz = (aa / (this.detailInfo.ladder_arr.length - 1)) * 100 + this.dd;
						console.log(zz)
						this.StepInfo = {
							Current: zz, //百分比（先传条数即可）
							Sum: Number(this.detailInfo.ladder_arr.length) //共多少步骤(Number类型)
						};
					}


					// =================================================================





					console.log(this.detailInfo)
					// 选择规格
					this.detailInfo.timeDifference = this.formatTimeDifference(this.detailInfo.end_time)

					this.detailInfo.timeOrderEnd = this.formatTimeDifferenceOrder(this.detailInfo.order_end)
					
					console.log('秒杀倒计时', this.detailInfo.timeDifference,this.detailInfo.timeOrderEnd)
					this.norms = this.detailInfo.spec

					this.percent_1 = this.detailInfo.grade;




					// }
					this.carousel = [this.detailInfo.pic_url];
					this.typeList = [{
							name: '最近更新',
							content: this.detailInfo.update_time
						},
						{
							name: '发布时间',
							content: this.detailInfo.create_time
						},
						{
							name: '开发者',
							content: this.detailInfo.developer,
							letter: 5
						},

						{
							name: '交付方式',
							content: this.detailInfo.give_type
						},
						{
							name: '源码加密',
							content: this.detailInfo.encrypt_type
						},
						// { name: '适用类型', content: this.detailInfo.app_type == 1 ? '小程序' : this.detailInfo.app_type == 2 ? '公众号' : 'app' },
						{
							name: '适用类型',
							content: this.detailInfo.apply_platform
						},
						{
							name: '支持语言',
							content: this.detailInfo.development_language,
							letter: 5
						},

					];

					// // 增加浏览量
					// this.addBrowse();
				}
			},

			// 单个产品详情
			async getDetail() {
				const result = await this.$http.get({
					url: this.$api.goodsDetail,
					data: {
						// 用户id
						uid: uni.getStorageSync('uid'),
						// 产品id
						goods_id: this.id,

					}
				});
				if (result.errno == 0) {
					this.detailInfo = result.data;
					console.log(this.detailInfo)
					// 选择规格

					this.norms = this.detailInfo.spec


					this.percent_1 = this.detailInfo.grade;
					console.log(this.percent_1, '星级=====================')
					if(this.user.is_partner==0){
						if (this.detailInfo.brokerage_type == 1) {
							this.commission = this.detailInfo.level_one
						} else if (this.detailInfo.brokerage_type == 2) {
							this.commission = Number(this.detailInfo.money * (Number(this.detailInfo.level_one) /
									100))
								.toFixed(2);
						}
					}else if(this.user.is_partner==1){
						if (this.detailInfo.brokerage_type_partner  == 1) {
							this.commission = this.detailInfo.level_one_partner
						} else if (this.detailInfo.brokerage_type_partner  == 2) {
							this.commission = Number(this.detailInfo.money * (Number(this.detailInfo.level_one_partner) /
									100))
								.toFixed(2);
						}
					}else{
						this.commission='xxxxxx'
					}


					// }
					this.carousel = [this.detailInfo.pic_url];
					this.typeList = [{
							name: '最近更新',
							content: this.detailInfo.update_time
						},
						{
							name: '发布时间',
							content: this.detailInfo.create_time
						},
						{
							name: '开发者',
							content: this.detailInfo.developer,
							letter: 5
						},

						{
							name: '交付方式',
							content: this.detailInfo.give_type
						},
						{
							name: '源码加密',
							content: this.detailInfo.encrypt_type
						},
						// { name: '适用类型', content: this.detailInfo.app_type == 1 ? '小程序' : this.detailInfo.app_type == 2 ? '公众号' : 'app' },
						{
							name: '适用类型',
							content: this.detailInfo.apply_platform
						},
						{
							name: '支持语言',
							content: this.detailInfo.development_language,
							letter: 5
						},

					];
					// // 增加浏览量
					// this.addBrowse();
				}
			},

			// 增加浏览量
			async addBrowse() {
				const result = await this.$http.get({
					url: this.$api.addBrowseNumber,
					data: {
						// 产品id
						goods_id: this.id
					}
				});
				if (result.code == 0) {}
			},

			// 增加分享量
			async addShare() {
				const result = await this.$http.get({
					url: this.$api.addShareNumber,
					data: {
						// 产品id
						goods_id: this.id
					}
				});
				if (result.errno == 0) {}
			},

			/* 点击事件 */

			// 小程序分享 与button的open-type 使用(接口)
			onShareAppMessage(res) {
				
				if (res.from === 'button') {
					console.log( '/pages/detail/detail?goods_id=' + this.detailInfo.id + '&type=' + this.activitType + '&uid=' +
							uni.getStorageSync('uid') ? uni.getStorageSync('uid') : '')
					// 来自页面内分享按钮
					console.log(res.target);
					// 增加分享量
					this.addShare();
				}

				return {
					// 自定义分享标题
					title: this.detailInfo.share_title ? this.detailInfo.share_title : this.detailInfo.name ? this
						.detailInfo.name : this.detailInfo.goods_name,
					imageUrl: this.detailInfo.share_pic ? this.detailInfo.share_pic : this.detailInfo.pic_url,
					desc: this.detailInfo.share_desc ? this.detailInfo.share_desc : '',
					path: '/pages/detail/detail?goods_id=' + this.detailInfo.id + '&type=' + this.activitType + '&uid=' +
						uni.getStorageSync('uid') ? uni.getStorageSync('uid') : '',
				};
			},
			// 回到首页
			toIndex() {
				this.$sun.navSwitch('/pages/index/index');
			},
			// 分享
			share() {
				if (this.handleLogin()) {
					this.$refs.pop.show({
						anim: 'bottom',
						position: 'bottom',
						shadeClose: false, //false使用户不能点击其它关闭页面
						topclose: false
					});
				}

			},
			// 客服（0）/二维码（1） 弹框
			popClick() {
				this.$refs.popCode.show({
					anim: 'center',
					shadeClose: false, //false使用户不能点击其它关闭页面
					topclose: false
				});
			},
			popCodeClose() {
				this.$refs.popCode.close();
			},
			// 跳转购物车
			toGwc() {
				this.$sun.navSwitch('/pages/shopCart/shopCart');
			},
			// 购买弹框
			buy() {

				console.log('111')
				if (this.handleLogin()) {
					if (this.norms && this.norms.length > 0) {
						this.specClick(0, this.norms[0]);
						this.$refs.popbuy.show({
							anim: 'bottom',
							position: 'bottom',
							shadeClose: true, //false使用户不能点击其它关闭页面
							topclose: false
						});
					} else {
						// this.$sun.navGo('/pages/confirmOrder/confirmOrder');
					}
				} 

			},
			// 秒杀付款跳转
			buyNow() {
				if(this.detailInfo.timeOrderEnd.des=='取消付款'&&this.detailInfo.timeDifference.seconds<0){
					this.$sun.toast('当前活动已结束','none')
				}else{
					// 判断当前是否库存
					if (this.detailInfo.inventory) {
						this.$sun.navGo('/pages/confirmOrder/confirmOrder');
					} else {
						this.$sun.toast('当前已无库存，看看其他活动吧', 'none')
					}
				}
				

			},
			// 付尾款跳转
			finalPayment() {
				if(this.detailInfo.timeOrderEnd.des=='取消付款'&&this.detailInfo.timeDifference.seconds<0){
					this.$sun.toast('当前活动已结束','none')
				}else{
					this.$sun.navGo('/pages/confirmOrder/confirmOrder');
				}
				
			},
			// 参加众筹
			partCrowdfunding() {
				if(this.detailInfo.timeOrderEnd.des=='取消付款'&&this.detailInfo.timeDifference.seconds<0){
					this.$sun.toast('当前活动已结束','none')
				}else{
					this.templateTpo()
					this.$sun.navGo('/pages/confirmOrder/confirmOrder');
				}
			
			},
			partNavgo() {
				this.$sun.navRe('/pages/orderMessage/orderList/orderList', {
					tabSwitchOrder: 3,
					tabOrder: 2
				});
			},
			// 规格确定
			confirm() {
				this.$refs.popbuy.close()
				setTimeout(() => {
					this.$sun.navGo('/pages/confirmOrder/confirmOrder');
				}, 500)
			},
			// 加入购物车
			addCar() {
				if (this.handleLogin()) {
					this.add();
				}
			},

			// 领取优惠券
			receive(id) {

			},
			// 加入购物车
			async add() {
				const result = await this.$http.post({
					url: this.$api.addCar,
					data: {
						foods_type: 1,
						uid: uni.getStorageSync('uid'),
						// 商品id
						goods_id: this.id,
						// 数量
						num: 1
					}
				});
				if (result.code == 0) {
					setTimeout(() => {
						antiThrottling.releaseKey('submit');
					}, 2500);
					this.$sun.toast(result.message);
				} else {
					this.$sun.toast(result.message);
					antiThrottling.releaseKey('submit');
				}
			},


			couponClose() {
				this.$refs.popcoupon.close();
			},
			cancel() {
				this.$refs.pop.close();
			},
			getChange(e) {
				this.navIndex = e;
			},
			// 生成海报
			poster() {
				this.$sun.navGo('/pages/detail/generatePoster', {
					type: 2
				});
				this.cancel();
			},
			goEvaluateList() {
				console.log('111')
				this.$sun.navGo('/pages/detail/allEvaluateList', {
					goods_id: this.id
				});
			}
		}
	};
	const numberToString = number => {
		var ar;
		for (let items in number) {
			const m2 = new Map({
				[Symbol.iterator]: function*() {
					yield [1, '公众号'],
						yield [2, '微信小程序'],
							yield [3, 'APP'],
								yield [4, 'PC'],
									yield [5, 'IOS'],
										yield [6, 'Android'],
											yield [7, '字节跳动小程序'],
												yield [8, '支付宝小程序'],
													yield [9, '百度小程序'],
														yield [10, 'h5'];
				}
			});
			console.log(number[items]);
			var get = m2.get(parseInt(number[items]));
			if (items == 0) {
				ar = get;
			} else {
				ar += '，' + get;
			}
		}

		return ar;
	};
</script>

<style lang="less">
	/deep/ button::after {
		border: none;
		margin: 0rpx;
		padding: 0rpx;
	}

	// 客服联系
	.v-popKf {
		width: 750rpx;
		background-color: #ffffff;
		border-radius: 20rpx 20rpx 0 0;

		.v-pop-phone {
			width: 100%;
			border-bottom: 2rpx solid #f7f7f7;
			color: #08ba06;
			font-size: 32rpx;
			padding: 36rpx 0 32rpx;

			image {
				width: 38rpx;
				height: 38rpx;
				margin-right: 12rpx;
			}
		}

		.v-cancel {
			width: 100%;
			padding: 36rpx 0;
			color: #8f8f8f;
			font-size: 32rpx;
		}
	}

	.achievementsImg {
		width: 174rpx;
		height: 174rpx;
		border-radius: 20rpx;
		padding: 6rpx;
		/* width: 174rpx;
				height: 174rpx;
				border-radius: 20rpx;
				padding: 6rpx; */
	}


	.v-delegation-page {
		.minus {
			width: 44rpx;
			height: 44rpx;
			border-width: 2rpx;
			border-color: #E6E6E6;
			border-style: solid;
			border-top-left-radius: 200rpx;
			border-top-right-radius: 200rpx;
			border-bottom-left-radius: 200rpx;
			border-bottom-right-radius: 200rpx;
			/* #ifndef APP-NVUE */
			display: flex;
			/* #endif */
			justify-content: center;
			align-items: center;
		}

		.input {
			// padding: 0 20rpx;
		}

		.plus {
			width: 44rpx;
			height: 44rpx;
			background-color: #0095FF;
			border-radius: 50%;
			/* #ifndef APP-NVUE */
			display: flex;
			/* #endif */
			justify-content: center;
			align-items: center;
		}

		.bg6 {
			background-repeat: no-repeat;
			position: relative;
			border-radius: 20rpx 20rpx 0rpx 0rpx;
			padding: 12rpx;
			background-image: (var(--bg-image));
			background-size: cover;
			top: -12rpx;

			height: 180rpx;

			.teamworkContainer {
				box-sizing: border-box;
				border: 2rpx solid rgb(255, 255, 255);
				border-radius: 8rpx;
				font-size: 16rpx;
				padding: 5rpx;
				margin-left: 28rpx;


			}

			.seckill {
				width: 218rpx;
				height: 44rpx;
				border-radius: 12rpx;

				background: rgb(255, 255, 255);
			}
		}

		.v-cover {
			width: 750rpx;
			height: 750rpx;
		}

		.crowdfundingNumbersContainer {
			text-align: center;
			padding: 30rpx;
			margin: 0 20rpx;
			margin-top: 30rpx;
			// width: 720rpx;

			border-radius: 20rpx;

			background: rgb(255, 255, 255);

			.joinAvaterImg {

				width: 80rpx;
				height: 80rpx;
				margin: 15rpx;

			}
		}

		.v-p-top2 {
			padding: 22rpx 46rpx 0 26rpx;
		}

		.v-top {
			border-radius: 20rpx 20rpx 0rpx 0rpx;
			background-color: #fff;
			margin-top: -25rpx;
			position: relative;

			.history {
				margin: 20rpx 0rpx 10rpx 20rpx;
				// width: 130rpx;
				padding: 20rpx;
				height: 50rpx;
				font-size: 26rpx;
				color: #E31616;
				border-radius: 10px;
				
				background: rgb(255, 238, 238);
			}

			.v-share-padding {
				// margin: 30rpx 0 40rpx;
				margin-top: 30rpx;



				.v-p-share {
					padding: 72rpx 24rpx 0 32rpx;


					.v-share-friend {
						text {
							color: #294d7d;
							font-size: 24rpx;
							padding-right: 50rpx;
						}

						view {
							color: #ffffff;
							width: 154rpx;
							height: 58rpx;
						}
					}

					.v-share-friend2 {
						text {
							color: #294d7d;
							font-size: 24rpx;
						}
					}
				}

				.v-share-bottom {
					margin-top: 68rpx;
					color: #8f8f8f;

					text {
						margin-right: 14rpx;
					}
				}
			}

			.v-conent {
				padding: 40rpx 24rpx 14rpx;
			}

			.v-details {
				color: #333;
				font-size: 32rpx;
				margin: 0 34rpx;
			}

			.v-send-points {
				color: #ffac53;
				background: #fff7d4;
				padding: 14rpx 22rpx;
				margin: 20rpx 20rpx 0;
			}

			.v-coupon {
				padding: 28rpx 26rpx 0 0;

				.coupon-detail {
					color: #ff3326;
					font-size: 24rpx;
					padding: 10rpx 12rpx;
					margin-left: 20rpx;
					display: inline-block;
					border: 2rpx solid #ff3326;
				}

				.v-arrow-right {
					width: 12rpx;
					height: 22rpx;
				}
			}

			.v-p-top {
				padding: 22rpx 46rpx 0 26rpx;
			}

			.v-p-top2 {
				padding: 22rpx 46rpx 0 26rpx;
			}

			.v-price {
				color: #ff3326;
				// margin: 0 20rpx;
				font-size: 28rpx;
				font-weight: bold;

				text {
					font-size: 42rpx;
				}
			}

			.v-commission {
				display: inline-block;
				color: #ff5f4e;
				background: #ffe4e1;
				// margin: 14rpx 20rpx 0;
				// margin-top: 14rpx;
				padding: 8rpx 16rpx;
			}

			.v-star-score {
				margin-left: 4rpx;
				margin-top: 4rpx;
				color: #ff5f4e;
				font-weight: bold;
			}

			.v-add-car {
				image {
					width: 70rpx;
					height: 70rpx;
				}

				text {
					margin: 4rpx 0 0 20rpx;
					color: #8f8f8f;
				}
			}

			.v-type {
				padding: 25rpx 48rpx 22rpx;

				.v-img {
					height: 28rpx;
					width: 28rpx;
					margin-right: 12rpx;
				}

				view {
					color: #8f8f8f;
					font-size: 24rpx;
				}
			}
		}

		.versionType {

			.v-m-width {
				margin-right: 20rpx;
				width: 80%;

				.pt_img {
					width: 60rpx;
					height: 60rpx;
					margin-right: -30rpx;
					border-radius: 50%;
				}
			}

			border-radius: 20rpx;
			margin: 22rpx 22rpx;
			background: rgb(255, 255, 255);

			.versionTypeImg {
				margin-right: 10rpx;
				width: 28rpx;
				height: 27.92rpx;
			}

			.rightImg {
				width: 17rpx;
				height: 27.92rpx;
			}

			.imgProcess {
				width: 708rpx;
				height: 288rpx;
			}

		}



		.evaluate {

			margin: 22rpx 22rpx;
			// height: 266rpx;
			border-radius: 20rpx;
			padding: 20rpx;
			background: rgb(255, 255, 255);

			.imgIcon {
				width: 92rpx;
				height: 92rpx;
				border-radius: 50%;
			}

			.v-star-score {
				margin-left: 4rpx;
				margin-top: 4rpx;
				color: #ff5f4e;
				font-weight: bold;
			}
		}

		.bargainingProgress {

			// height: 258rpx;
			border-radius: 20rpx;
			padding: 30rpx;
			background: rgb(255, 255, 255);
			margin: 22rpx 22rpx;
		}

		.bargainPrice {
			margin: 22rpx 22rpx;
			// height: 266rpx;
			border-radius: 20rpx;
			padding: 30rpx;
			background: rgb(255, 255, 255);

			.joinNow {
				width: 150rpx;
				height: 64rpx;
				border-radius: 88rpx;
				color: #fff;

				background: rgb(255, 31, 39);
			}

			.joinNowNo {
				width: 150rpx;
				height: 64rpx;
				border-radius: 88rpx;
				color: #595959;

				background: #D0D0D0;
			}

			.v-p-share {
				padding: 2rpx 2rpx 0 2rpx;

				.v-m-width {
					margin-right: 40rpx;

					.pt_img {
						width: 60rpx;
						height: 60rpx;
						margin-right: -30rpx;
						border-radius: 50%;
					}
				}

				.v-share-friend {
					text {
						color: #294d7d;
						font-size: 24rpx;
						padding-right: 50rpx;
					}

					view {
						color: #ffffff;
						width: 154rpx;
						height: 58rpx;
					}
				}

				.v-share-friend2 {
					text {
						color: #294d7d;
						font-size: 24rpx;
					}
				}
			}


		}

		.v-margin {
			margin: 24rpx 0 14rpx;
		}

		.v-fixed {
			z-index: 999;
			position: fixed;
			bottom: 200rpx;
			right: 48rpx;

			.v-icon,
			.v-icon2 {
				margin-bottom: 24rpx;
				width: 100rpx;
				height: 100rpx;
				z-index: 9999;
				background-color: #ffffff;
				border-radius: 50%;
				box-shadow: 0 0 8rpx rgba(0, 0, 0, 0.1);

				image {
					width: 38rpx;
					height: 38rpx;
				}
			}

			.v-icon {
				view {
					// margin-top: 6rpx;
					color: #294d7d;
					font-size: 24rpx;
				}
			}

			.v-icon2 {
				view {
					margin-top: 6rpx;
					color: #fea751;
					font-size: 24rpx;
				}
			}
		}

		.v-bottom-fixed {
			border-top: 2rpx solid #eee;
			width: 100%;
			height: 132rpx;
			background-color: #ffffff;
			z-index: 965;
			position: fixed;
			bottom: 0;
			right: 0;

			.v-icon {

				width: 100rpx;
				height: 100rpx;
				z-index: 9999;
				background-color: #ffffff;
				margin-left: 15rpx;

				image {
					width: 48rpx;
					height: 48rpx;
				}
			}

			.v-icon {
				view {
					// margin-top: 6rpx;
					color: #294d7d;
					font-size: 24rpx;
				}
			}



			.v-cart {
				margin-left: 50rpx;

				image {
					width: 48rpx;
					height: 48rpx;
				}

				view {
					margin-top: 4rpx;
					color: #294d7d;
				}
			}

			.v-btn {
				width: 200rpx;
				height: 92rpx;
				border-radius: 0rpx 100rpx 100rpx 0rpx;
				color: #fff;
				background: rgb(0, 149, 255);
			}

			.shareFirend {
				width: 220rpx;
				height: 92rpx;
				border-radius: 100rpx 0rpx 0rpx 100rpx;
				color: #0095FF;
				background: rgb(224, 242, 255);
			}

			.groupbuyingBtn {
				width: 381rpx;
				height: 98rpx;
				border-radius: 100rpx;
				color: #fff;
				background: rgb(239, 60, 46);

				/deep/ .uni-countdown {
					text {
						font-size: 22rpx !important;
						color: #fff !important;
						// width: 15rpx;
						margin: auto;
					}


				}
			}

			.groupbuyingBtnNo {
				width: 381rpx;
				height: 98rpx;
				border-radius: 100rpx;
				color: rgb(159, 159, 159);
				;
				background: rgb(239, 239, 239);

				/deep/ .uni-countdown {
					text {
						font-size: 22rpx !important;
						color: #fff !important;
					}
				}
			}

			.v-coupon-close {}
		}

		// 领取优惠券
		.v-pop-coupon {
			background: #ffffff;
			border-radius: 20rpx 20rpx 0 0;
			padding: 66rpx 0;

			.v-coupon-tilte {
				font-size: 32rpx;
				font-weight: bold;
				padding-bottom: 60rpx;
			}

			.v-discount {
				font-size: 32rpx;
				padding: 0 24rpx 30rpx;
			}

			.v-coupons {
				margin: 0 24rpx 20rpx;
				background-color: #f1f5ff;

				// background: #fcfdff;
				.v-left {
					.v-coupon-price {
						width: 140rpx;
						color: #294d7d;
						font-size: 36rpx;
						font-weight: bold;
						padding: 0 32rpx;
					}

					.v-identification {
						font-size: 24rpx;
						margin-top: 10rpx;
						color: #bdbbbb;
					}

					.v-conditions-met {
						border-left: 2rpx dashed #c9caca;
						padding: 0 34rpx;

						text {
							color: #a1a1a1;
							font-size: 24rpx;
							padding: 6rpx;
						}
					}
				}

				.v-coupon-btn {
					background: #294d7d;
					color: #ffffff;
					min-width: 150rpx;
					padding: 60rpx 0;
					font-size: 32rpx;
				}
			}

			.v-coupon-close {
				font-size: 32rpx;
				background: #294d7d;
				color: #ffffff;
				border-radius: 90rpx;
				margin-top: 20rpx;
				width: 648rpx;
				height: 96rpx;
			}
		}

		// 分享
		.v-pop {
			background: #ffffff;
			border-radius: 20rpx 20rpx 0 0;
			padding-top: 66rpx;

			.v-pop-margin {
				margin: 0 148rpx;
			}

			.v-select-type {
				view {
					width: 160rpx;
					height: 160rpx;
					background: #f7f7f7;
					border-radius: 10rpx;
				}

				image {
					width: 100rpx;
					height: 80rpx;
				}

				text {
					color: #294d7d;
					margin-top: 28rpx;
				}
			}

			.v-cancel {
				padding: 60rpx 0;
				width: 100%;
				color: #8f8f8f;
				font-size: 36rpx;
			}
		}

		// 二维码
		.v-pop-code {
			.v-qr-code {
				padding: 42rpx 0 56rpx;
				background: #ffffff;
				border-radius: 10rpx;
				width: 526rpx;

				image {
					width: 380rpx;
					height: 380rpx;
				}

				text {
					margin-top: 26rpx;
				}
			}

			.v-close-img {
				width: 82rpx;
				height: 82rpx;
				margin-top: 46rpx;
			}
		}

		// 立即购买
		.v-pop-buy {
			height: 800rpx;
			background: #ffffff;
			border-radius: 20rpx 20rpx 0 0;

			.v-specname {
				font-size: 32rpx;
				font-weight: bold;
				padding: 10rpx 30rpx 30rpx;
			}

			.v-spec-all {
				padding: 30rpx 0;

				image {
					width: 200rpx;
					height: 200rpx;
					border-radius: 10rpx;
					margin: 0 20rpx 0 30rpx;
				}

				.v-spec-name {
					view {
						color: red;
					}

					.v-price {
						color: #ff3326;
						padding-top: 65rpx;
						font-size: 28rpx;
						font-weight: bold;

						text {
							font-size: 38rpx;
						}
					}

					text {
						font-size: 36rpx;
						font-weight: bold;
					}
				}
			}

			.v-p-bj1 {
				background: #f5f5f5;
			}

			.v-p-bj2 {
				background: #e1ecff;
			}

			.v-p-bj {
				margin: 0 0 28rpx 38rpx;
				padding: 20rpx 30rpx;
				/* height: 80rpx; */
				// line-height: 60rpx;
				border-radius: 20rpx;

				.v-price {
					color: #7a5520;
					font-size: 32rpx;

					text {
						font-size: 60rpx;
					}
				}

				.v-price2 {
					color: #7a5520;
					font-size: 32rpx;

					text {
						font-size: 40rpx;
					}
				}

				.v-detial {
					color: #7a5520;
					font-size: 24rpx;
					margin-top: 28rpx;
				}
			}

			.v-confirm {
				position: absolute;
				bottom: 0;
				height: 106rpx;
				width: 100%;
				color: #fff;
				background-color: #0095FF;
				font-size: 36rpx;
			}
		}
	}
</style>